﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using LGE;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;

namespace Stealth
{
    public class BloodBag : GameObject
    {
        // fatores da senoide
        const int a = 1;  // quanto maior, mais longo
        const int b = 150; // quanto maior, mais devagar

        public BloodBag(PlayScreen ps, Vector2 position)
            : base(ps, Engine.Load<Texture2D>("Images\\bloodbag"))
        {
            this.position = position;
        }

        public override void Update(GameTime gameTime)
        {
            position.Y += a * (float)Math.Sin(gameTime.TotalGameTime.TotalMilliseconds / b);
            if (Collision(ps.c)) ps.bloodBag = null;
        }
    }
}